package com.dhl.memento.theory;

import java.util.ArrayList;
import java.util.List;

/**
 * @title: Careatker
 * @Author danghailiang
 * @Date: 2022/8/22 15:59
 * @Version 1.0
 */
public class Caretaker {

    private List<Memento> mementos = new ArrayList<>();

    public void add(Memento memento){
        mementos.add(memento);
    }

    public Memento get(int index){
        return mementos.get(index);
    }
}
